import 'package:flutter/material.dart';
import 'package:flutter_demo/pages/profile/components/tag.dart';
import 'package:flutter_svg/svg.dart';

class BaseInfo extends StatelessWidget {
  const BaseInfo({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
      width: double.infinity,
      child: Stack(
        children: [
          Column(
            children: [
              Row(
                children: [
                  CircleAvatar(
                    radius: 30, // 头像半径
                    backgroundImage:
                        const AssetImage('assets/images/avatar.jpg'), // 头像图片
                    child: Container(
                      decoration: BoxDecoration(
                        shape: BoxShape.circle, // 设置圆形形状
                        border: Border.all(
                          color: const Color(0xFFC7BAF7), // 描边颜色
                          width: 2, // 描边宽度
                        ),
                      ),
                    ),
                  ),
                  const SizedBox(width: 16),
                  const Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text(
                        '用户名',
                        style: TextStyle(
                          fontSize: 16,
                          color: Colors.black87,
                          fontWeight: FontWeight.bold,
                        ),
                      ),
                      SizedBox(height: 6),
                      Row(
                        children: [
                          Row(
                            children: [
                              Text(
                                'ID: 1210301104',
                                style: TextStyle(
                                  fontSize: 14,
                                  color: Colors.black87,
                                ),
                              ),
                              SizedBox(width: 4),
                              Icon(
                                IconData(
                                  0xe668,
                                  fontFamily: 'IconFont',
                                ), // 0xe800 是图标代码
                                size: 16,
                                color: Colors.black87,
                              ),
                            ],
                          ),
                          SizedBox(width: 10),
                          Tag('萝莉音'),
                          SizedBox(width: 10),
                          Tag('少女音'),
                        ],
                      )
                    ],
                  )
                ],
              ),
              const SizedBox(height: 14),
              Row(
                children: [
                  Container(
                    padding:
                        const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(4),
                      border: Border.all(width: 1, color: Colors.black12),
                    ),
                    child: const Row(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          IconData(
                            0xe605,
                            fontFamily: 'IconFont',
                          ), // 0xe800 是图标代码
                          size: 12,
                          color: Color(0xFFBCEF62),
                        ),
                        SizedBox(width: 4),
                        Text(
                          '在线',
                          style: TextStyle(
                            color: Colors.black87,
                            fontSize: 10,
                          ),
                        ),
                      ],
                    ),
                  ),
                  const SizedBox(width: 8),
                  Container(
                    padding:
                        const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(4),
                      border: Border.all(width: 1, color: Colors.black12),
                    ),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        SvgPicture.asset(
                          'assets/images/icon_birthday.svg',
                          width: 12,
                          height: 12,
                          fit: BoxFit.cover,
                        ),
                        const SizedBox(width: 4),
                        const Text(
                          '25',
                          style: TextStyle(
                            color: Colors.black87,
                            fontSize: 10,
                          ),
                        ),
                      ],
                    ),
                  ),
                  const SizedBox(width: 8),
                  const Tag(
                    '好评率100%',
                    backgroundColor: Color(0xFFC7BAF7),
                    textColor: Colors.white,
                  ),
                  const SizedBox(width: 8),
                  const Tag(
                    '服务200玩家',
                    backgroundColor: Color(0xFFBAD7F7),
                    textColor: Colors.white,
                  ),
                  const SizedBox(width: 8),
                  Container(
                    padding:
                        const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
                    decoration: BoxDecoration(
                      color: Colors.black,
                      borderRadius: BorderRadius.circular(4),
                      border: Border.all(width: 1, color: Colors.black),
                    ),
                    child: const Row(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          IconData(
                            0xe681,
                            fontFamily: 'IconFont',
                          ), // 0xe800 是图标代码
                          size: 12,
                          color: Color(0xFFEFD1A9),
                        ),
                        SizedBox(width: 4),
                        Text(
                          '电竞指导',
                          style: TextStyle(
                            color: Color(0xFFEFD1A9),
                            fontSize: 10,
                          ),
                        ),
                      ],
                    ),
                  ),
                ],
              ),
              const SizedBox(height: 24),
              const Row(
                children: [
                  Text(
                    '陪练的亲亲们都敲厉害哒👍🏻~',
                    style: TextStyle(
                      color: Colors.black87,
                      fontSize: 14,
                    ),
                  ),
                  SizedBox(width: 6),
                  Icon(
                    IconData(
                      0xe65d,
                      fontFamily: 'IconFont',
                    ), // 0xe800 是图标代码
                    size: 16,
                    color: Colors.black87,
                  ),
                ],
              ),
              const SizedBox(height: 32),
              Row(
                children: [
                  Container(
                    padding: const EdgeInsets.only(
                      right: 40,
                    ),
                    child: const Column(
                      children: [
                        Text(
                          '123',
                          style: TextStyle(
                            fontSize: 20,
                            color: Colors.black,
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                        Text(
                          '关注',
                          style: TextStyle(
                            fontSize: 12,
                            color: Colors.black54,
                          ),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    padding: const EdgeInsets.only(
                      right: 40,
                    ),
                    child: const Column(
                      children: [
                        Text(
                          '35',
                          style: TextStyle(
                            fontSize: 20,
                            color: Colors.black,
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                        Text(
                          '粉丝',
                          style: TextStyle(
                            fontSize: 12,
                            color: Colors.black54,
                          ),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    padding: const EdgeInsets.only(
                      right: 40,
                    ),
                    child: const Column(
                      children: [
                        Text(
                          '35',
                          style: TextStyle(
                            fontSize: 20,
                            color: Colors.black,
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                        Text(
                          '获赞',
                          style: TextStyle(
                            fontSize: 12,
                            color: Colors.black54,
                          ),
                        ),
                      ],
                    ),
                  ),
                ],
              ),
              const SizedBox(height: 24)
            ],
          )
        ],
      ),
    );
  }
}
